package example.tx;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class UserRepository {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    public void add() {
        String sql = " INSERT INTO `admin`.`user`(`username`, `password`) VALUES (?,?) ";
        jdbcTemplate.update(sql, "jingjing", 20);
    }

}


